<div class='wrap_permission'>
  <label>权限</label>            
  <hr />
  <div>
    <table class="table table-bordered">
      <thead>
        <tr>
          <th>模块</th>
          <th>功能</th>
        </tr>
      </thead>
      <tbody>
        <% permissions.each do |new, items| %>
          <% items.each_with_index do |item, i| %>
          <tr>
            <% if i == 0 %>
            <td rowspan="<%=items.count %>"><%=items.first.class_name_at %></td>
            <% end %>
            <td>
              <input name='permission[]' value="<%=item.id %>" type='checkbox' <%= 'checked' if owner_permissions.include?(item) %>  /><%=item.ability_at %>
            </td>
          </tr>
          <% end %>
        <% end %>
      </tbody>
    </table>
  </div>
</div>